package com.sesxh.zbss;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sesxh.zbss.service.TableService;

import org.springframework.stereotype.Controller;

@Controller
@RequestMapping("/user/agg/bizpoint")
public class AppController  {
	@Autowired
	private TableService tableService;
	
	private Logger logger = LoggerFactory.getLogger(AppController.class);
	
	
	   
	  @RequestMapping(value="/faceCodeVerify", method = {RequestMethod.POST,RequestMethod.GET} ,produces = MediaType.APPLICATION_JSON_VALUE)
	  public @ResponseBody Object doapi(@RequestBody(required=false) Map<String, String> postmap,
			  HttpServletRequest httpRequest) {
		  
		  logger.info("-faceCodeVerify-postmap:{}}",postmap);
			
			 return "ok";
	    }
	  
	  @RequestMapping(value="/createTableCol", method = {RequestMethod.POST,RequestMethod.GET} ,produces = MediaType.APPLICATION_JSON_VALUE)
	  public @ResponseBody Object createTableCol(String tablename,@RequestBody Map<String,Object> col,
			  HttpServletRequest httpRequest) {
		  tableService.createTableOrAddCol(tablename,col);
			
			 return "ok";
	    }
	  
	  
	  
	  
	

}